package com.xiaoxin.exception;

import com.xiaoxin.model.vo.ErrorResult;
import lombok.Data;

/**
 * @author xiaoxiaode
 * @date 2021-08-30-17:03
 **/
/*
 * 自定义异常类
 * */
@Data
public class BusinessException extends RuntimeException {

    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult) {
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }
}
